Title: SQL BT (By-BKK) / 18 Drop
Tags: Obsidian_to_Anki

Q: What SQL statement removes a table and its schema?
A: DROP TABLE

Q: True/False: DROP TABLE only deletes data, not the table structure
A: False. It deletes both data and table structure

Q: What happens if you use DROP TABLE without IF EXISTS and the table is missing?
A: An error is thrown

Q: How can you avoid errors when dropping tables that might not exist?
A: Use IF EXISTS clause

Q: What must you do if other tables depend on the table you drop?
A: Update or remove dependent tables first

Q: Does DROP TABLE affect foreign key relationships in other tables?
A: Yes, dependencies may break

Q: Give an example SQL command to remove a table safely
A: DROP TABLE IF EXISTS mytable;

Q: What does DROP TABLE do in SQL?
A: DROP TABLE removes both data and structure from the database

Q: How do you suppress errors if the table doesn’t exist when dropping?
A: IF EXISTS clause

Q: Why should you check other tables before DROP TABLE?
A: Dependencies must be handled before dropping tables

Q: True/False: DROP TABLE only removes rows, but keeps the schema
A: DROP TABLE deletes the entire table, including its schema

Q: Show the SQL syntax for deleting a table if present
A: DROP TABLE IF EXISTS mytable